我的错误:
java.sql.SQLException: Listener refused the connection with the following error:
ORA-12516, TNS:listener could not find available handler with matching protocol
stack
The Connection descriptor used by the client was:
//10.2.5.21:9001/XE
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java
:112)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java
:261)
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:387)
at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:
414)
at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:165)
at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtensio
n.java:35)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:801)
at oracle.jdbc.pool.OracleDataSource.getPhysicalConnection(OracleDataSou
rce.java:297)
at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java
:221)
at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java
:165)
at utilityService.DB_util.setOracleConnectionActive(DB_util.java:99)
at utilityService.DB_util.getRecPreparedAuthentication(DB_util.java:124)
Run Code Online (Sandbox Code Playgroud)
我的常见数据库连接类:
package utilityService;
import java.sql.CallableStatement;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import oracle.jdbc.pool.OracleDataSource;
public class …Run Code Online (Sandbox Code Playgroud) 我从stock.py文件和行号163获得此代码
'complete_name': fields.function(_complete_name, type='char', size=256, string="Location Name",
store={'stock.location': (_get_sublocations, ['name', 'location_id'], 10)}),
Run Code Online (Sandbox Code Playgroud)
请在上面的字段中给我一个关于以下商店属性的解释.
我们可以使用fields.function(type ='many2one'吗?如果可以请在openerp 7中给我一个参考样本代码或样本模型类
这是我的java代码
public static Map<String,String> propertyFileReader() {
Map<String, String> map=new HashMap<String, String>();
Properties prop = new Properties();
try {
InputStream inputStream = Util.class.getClassLoader().getResourceAsStream("jdbc.properties");
prop.load(inputStream);
final String DB_DRIVER= prop.getProperty("DB_DRIVER");
final String DB_CONNECTION = prop.getProperty("DB_CONNECTION2");
final String DB_USER = prop.getProperty("DB_USER");
final String DB_PASSWORD = prop.getProperty("DB_PASSWORD");
map.put("DB_DRIVER",DB_DRIVER);
map.put("DB_CONNECTION",DB_CONNECTION);
map.put("DB_USER",DB_USER);
map.put("DB_PASSWORD",DB_PASSWORD);
} catch (IOException e) {
e.printStackTrace();
}
return map;
}
private static Connection getDBConnection() {
Map<String , String > map=new HashMap<String, String>();
map=propertyFileReader();
String DB_DRIVER=map.get("DB_DRIVER");
String DB_CONNECTION= map.get("DB_CONNECTION");
String DB_USER=map.get("DB_USER");
String DB_PASSWORD=map.get("DB_PASSWORD");
Connection dbConnection …Run Code Online (Sandbox Code Playgroud) 请告诉我这个.需要删除删除图标.但需要创建和编辑记录.如果我将其设置为只读,那么也无法编辑.那么实现它的更好方法是什么

这是我的错误
java.security.spec.InvalidKeySpecException: java.security.InvalidKeyException: IOException: DerInputStream.getLength(): lengthTag=127, too big.
at sun.security.rsa.RSAKeyFactory.engineGeneratePublic(Unknown Source)
at java.security.KeyFactory.generatePublic(Unknown Source)
at com.sanjaya.rsa.PublicKeyReader.get(PublicKeyReader.java:22)
at com.sanjaya.rsa.MainKeyClass.main(MainKeyClass.java:8)
Caused by: java.security.InvalidKeyException: IOException: DerInputStream.getLength(): lengthTag=127, too big.
at sun.security.x509.X509Key.decode(Unknown Source)
at sun.security.x509.X509Key.decode(Unknown Source)
at sun.security.rsa.RSAPublicKeyImpl.<init>(Unknown Source)
at sun.security.rsa.RSAKeyFactory.generatePublic(Unknown Source)
... 4 more
Run Code Online (Sandbox Code Playgroud)
这是我的代码 -主类
public static void main(String[] args) {
PublicKeyReader publicKeyReader=new PublicKeyReader();
try {
publicKeyReader.get("c:\\public.key");
} catch (Exception e) {
e.printStackTrace();
}
PrivateKeyReader privateKeyReader=new PrivateKeyReader();
try {
privateKeyReader.get("c:\\private.key");
} catch (Exception e) {
e.printStackTrace();
}
Run Code Online (Sandbox Code Playgroud)
这是公钥相关的方法
public static PublicKey …Run Code Online (Sandbox Code Playgroud) 这是我的代码片段.我需要从某个日期减去天数,但我没有得到我期望的结果:
public class TestingDates {
public static void main(String[] args) {
Date toDate=new Date();
Date fromDate=new Date();
for (int i = 0; i < 30; i++) {
fromDate.setTime(toDate.getTime() - i * 24 * 60 * 60 * 1000);
System.out.println(fromDate);
}
}
}
Run Code Online (Sandbox Code Playgroud)
而且我对这个结果感到困惑
这是输出
Fri Sep 13 12:24:50 IST 2013
Thu Sep 12 12:24:50 IST 2013
Wed Sep 11 12:24:50 IST 2013
Tue Sep 10 12:24:50 IST 2013
Mon Sep 09 12:24:50 IST 2013
Sun Sep 08 12:24:50 IST 2013 …Run Code Online (Sandbox Code Playgroud) <?xml version="1.0" ?>
<openerp>
<data>
<record model="ir.module.category" id="module_lunch_category">
<field name="name">Lunch</field>
<field name="description">Helps you handle your lunch needs, if you are a manager you will be able to create new products, cashmoves and to confirm or cancel orders.</field>
<field name="sequence">16</field>
</record>
<record id="group_lunch_user" model="res.groups">
<field name="name">User</field>
<field name="category_id" ref="module_lunch_category"/>
</record>
<record id="group_lunch_manager" model="res.groups">
<field name="name">Manager</field>
<field name="implied_ids" eval="[(4, ref('group_lunch_user'))]"/>
<field name="category_id" ref="module_lunch_category"/>
<field name="users" eval="[(4, ref('base.user_root'))]"/>
</record>
</data>
</openerp>
Run Code Online (Sandbox Code Playgroud)
我现在已经在我的应用程序中遇到了安全处理问题.代码显示在这里
我也参考文档来澄清上面的xml代码.但是我在文档中对版本7没有很好的解释.我需要在下面的部分进行说明.请建议我清楚了解它
请解释
ir.module.category意味着.?
<record model="ir.module.category" id="module_lunch_category">
Run Code Online (Sandbox Code Playgroud)
model ="res.groups"的意思是.?
<record id="group_lunch_user" …Run Code Online (Sandbox Code Playgroud) 我在subscription.py类中看到了这段代码.它为用户提供了选择和多个字段.我在openerp文档和其他模块中找到了,但我从未找到任何细节或其他样本
这是它的观点

这是与该字段相关的代码
'doc_source': fields.reference('Source Document', required=True, selection=_get_document_types, size=128),
Run Code Online (Sandbox Code Playgroud)
这是选择部分功能代码
def _get_document_types(self, cr, uid, context=None):
cr.execute('select m.model, s.name from subscription_document s, ir_model m WHERE s.model = m.id order by s.name')
return cr.fetchall()
Run Code Online (Sandbox Code Playgroud)
我需要知道; 我们可以创建自己的fields.reference类型字段吗?
另一个组合而不是MODEL,NAME ..?
这是我的代码
SELECT h.ENTERED_DATE,
d.DENOMINATION,
sum(h.invoice_total-h.TOTTAL_DISCOUNT)as amount
FROM sales_details d
LEFT JOIN sales_header h
ON d.invoice_id=h.invoice_id
WHERE entered_by='2254'
--HERE IS NEED TO GET DETAILS CURRENT MONTH 1st Date to Sysdate
GROUP BY
ENTERED_DATE,
d.DENOMINATION
ORDER BY
entered_date,
denomination
Run Code Online (Sandbox Code Playgroud)
这里显示了我的两个表
sales_header表

sales_details表

请解释下列陈述的意思并指出它们之间的区别。我浏览了论坛帖子,但没有从这些帖子中得到清晰的想法,文档也没有提到这些东西。
我从sale_security.xml文件中得到以下代码
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data noupdate="0">
Run Code Online (Sandbox Code Playgroud)
和
<data noupdate="1">
Run Code Online (Sandbox Code Playgroud)